package com.skillworld.webapp.model.util.dao;

import java.io.Serializable;
import java.util.List;

import es.udc.pojo.modelutil.exceptions.InstanceNotFoundException;

public interface GenericDao <E, PK extends Serializable>{

	void save(E entity);

	void remove(PK id) throws InstanceNotFoundException;
	//void remove(E persistentInstance);
	
	E findById(PK id) throws InstanceNotFoundException;
	List<E> findAll();
	List<E> findByExample(E instance);

	boolean exists(PK id);
	
	//public List<E> findByProperty(String propertyName, Object value);

}
